//lifetime生命周期
#[derive(Debug)]
struct Person<'a> {
    name: &'a str,
    age: u8,
}

impl<'a> Person<'a> {
    fn new(name: &'a str, age: u8) -> Self {
        Person {
            name: name,
            age: age,
        }
    }
}

fn main() {
    let person = Person::new("张三", 32);
    println!("{:?}    name:{}  age:{}", person, person.name, person.age);
}
